<style type="text/css">
.content{
    background: #f1f4f6;
}
body.is-dialog {
    background: #f1f4f6;
}
.box{
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 3px solid #ffffff;
}
.text_div{
    padding-top: 7px;
}
.plupload-preview li, .faupload-preview li{
     margin-top: 0px;
     margin-bottom: 0px;
}
.li_div{
    float: left;
}
.li_div_info{
    float: right;
    padding-left: 10px;
    padding-top: 17px;
}
.goods_td{
    display:table-cell;
    vertical-align:middle !important;
}
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="box">
    
    <div class="panel-heading">訂單詳情</div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">訂單編號:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.order_no}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">下單時間:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{:$row.createtime?datetime($row.createtime):''}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">訂單狀態:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.order_status_text}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">實付金額:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.pay_price|htmlentities}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">支付時間:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{:$row.paytime?datetime($row.paytime):''}</div>
        </div>
    </div>
</div>
<div class="box">
    
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">用戶信息:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview" id="p-images">
                <li class="li_div">
                    <div class="li_div">
                        <a href="{$user.avatar}" target="_blank" class="thumbnail">
                            <img src="{$user.avatar}" class="img-responsive">
                        </a>
                    </div>
                    <div class="li_div_info">
                        <div>{$user.nickname}</div>
                        <div>{$user.mobile}</div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">收貨人:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.name|htmlentities}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">聯繫方式:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.mobile|htmlentities}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">地區:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.region_type_text|htmlentities}</div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">收貨地址:</label>
        <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.address|htmlentities}</div>
        </div>
    </div>
</div>

        <div class="box">
                <div class="box-body">
                    <div class="panel panel-default">
                        <div class="panel-heading">商品详情</div>
                        <table class="table">
                            <tr>
                                <td>商品圖片</td>
                                <td>商品名稱</td>
                                <td>商品規格</td>
                                <td>商品數量</td>
                                <td>商家售價</td>
                                <td>優惠金額</td>
                                <td>積分</td>
                                <td>運費</td>
                            </tr>
                            {foreach name="row.goods" item="item"}
                            <tr>
                                <td>
                                    <a href="{:explode(',',$item.images)[0]}" target="_blank" class="">
                                        <img src="{:explode(',',$item.images)[0]}" class="img-responsive" width="50px">
                                    </a>
                                </td>
                                <td class="goods_td">{$item.goods_name}</td>
                                <td class="goods_td">{$item.goods_attr}</td>
                                <td class="goods_td">{$item.total_num}</td>
                                <td class="goods_td">{$item.goods_price}</td>
                                <td class="goods_td">{:$item.line_price - $item.goods_price?sprintf("%.2f",$item.line_price - $item.goods_price):sprintf("%.2f",0)}</td>
                                <td class="goods_td">{$item.integral}</td>
                                <td class="goods_td">{$item.delivery_price}</td>
                            </tr>
                            {/foreach}
                            <tr style="border-top: 1px solid #f4f4f4;"><td colspan="8"  align="right">共 {$row.total_num} 件 商品  合計金額：{$row.pay_price}</td></tr>
                        </table>
                    </div>
                </div>
        </div>
    {if $row.expresssn}
        <div class="box">
            
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">快遞公司:</label>
                <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.expressname|htmlentities}</div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">快遞單號:</label>
                <div class="col-xs-12 col-sm-8"><div class="text_div">{$row.expresssn|htmlentities}</div>
                </div>
            </div>
        </div>

    {/if}

    {if $row.order_status  == 20}
        <div class="box">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>選擇快遞公司:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-express" data-rule="required" data-source="/FQfZvLoCyH.php/expressquerys/index" class="form-control selectpage" name="row[express]" type="text" value="" data-params='{"custom[coding]":["neq",""]}' data-order-by="id"  placeholder="選擇快遞公司">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2"><a style="color: red" >*</a>快遞單號:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-expresssn" data-rule="required;length(~30)" class="form-control" name="row[expresssn]" type="text" value="" placeholder="請輸入快遞單號">
                </div>
            </div>
        </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
    {/if}
    <!-- <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div> -->
</form>